//package com.gjy.sharding.jdbc.sharding;
//
//import org.apache.shardingsphere.sharding.api.sharding.standard.PreciseShardingValue;
//import org.apache.shardingsphere.sharding.api.sharding.standard.RangeShardingValue;
//import org.apache.shardingsphere.sharding.api.sharding.standard.StandardShardingAlgorithm;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.stereotype.Component;
//
//import java.util.Collection;
//import java.util.Collections;
//
///**
// * @author gjy
// * @version 1.0
// * @since 2025-07-10 09:07:44
// */
//@Component
//public class MonthShardingAlgorithm implements StandardShardingAlgorithm<Integer> {
//
//    private static final Logger log = LoggerFactory.getLogger(MonthShardingAlgorithm.class);
//
//    @Value("${sharding.algorithm.value}")
//    private String value;
//
//    @Override
//    public String doSharding(Collection<String> collection, PreciseShardingValue<Integer> precise) {
//        log.info("精确匹配查询,处理 = in : {}", value);
//        return "energy_fee";
//    }
//
//    @Override
//    public Collection<String> doSharding(Collection<String> collection, RangeShardingValue<Integer> range) {
//        log.info("范围分片查询,处理 < > : {}", value);
//        return Collections.singleton("energy_fee");
//    }
//
//    @Override
//    public String getType() {
//        return "MONTH";
//    }
//}
